import { driver } from 'driver.js'
import 'driver.js/dist/driver.css'
import { Config } from '@/constants/driver/type'
import { NORMAL_CONFIG, STEP_CONFIG } from '@/constants/driver/list'
export const useDriver = (type: string) => {
  // 合并引导语配置
  const driverObj: Config = {
    ...NORMAL_CONFIG,
    steps: STEP_CONFIG[type]
  }

  // 初始化
  const info = driver(driverObj)
  // 开始引导
  return info.drive()
}
